<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:body>
    <h:form>
        <h:inputText value="#{validations.title}" required="true">
            <f:validateLength minimum="2" maximum="20"/>
        </h:inputText>
        <h:inputText value="#{validations.price}">
            <f:validateLongRange minimum="1" maximum="500"/>
        </h:inputText>
        <h:inputText value="#{validations.custom}">
            <f:validator validatorId="customValidator"/>
        </h:inputText>
        <h:messages errorStyle="color:red"/>
        <h:commandButton value="print" action="#{validations.print}"/>
    </h:form>
</h:body>
</html>
